package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Commdity;
import com.example.demo.entity.Shopcard1;
import com.example.demo.entity.Shopcard2;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface Shop2Mapper extends BaseMapper<Shopcard2> {
    @Select("SELECT id FROM Shopcard2 where username=#{username} and shopid=#{shopid}")
    Boolean pandun2(String username,Integer shopid);

    @Select("SELECT id FROM Shopcard2 where username=#{username} and shopid=#{shopid}")
    Integer findid(String username,Integer shopid);

    @Select("INSERT into Shopcard2(username,shopid) values (#{username},#{shopid})")
    Boolean addshopcard2(String username,Integer shopid);
}
